package com.moleq.itemsetting.models;

import com.moleq.db.DatabaseSchema;

public class ItemPic {
	private String upc;
	private String ip_image;
	private String ip_image_sm;
	public String getUpc() {
		return upc;
	}
	public void setUpc(String upc) {
		this.upc = upc;
	}
	public String getIp_image() {
		return ip_image;
	}
	public void setIp_image(String ip_image) {
		this.ip_image = ip_image;
	}
	public String getIp_image_sm() {
		return ip_image_sm;
	}
	public void setIp_image_sm(String ip_image_sm) {
		this.ip_image_sm = ip_image_sm;
	}
	public String toMGData(String Action) {
//		String Result = Action + "|" + DatabaseSchema.ItemPic.SCHEMA_NAME
//				+ "|([UPC]" + CheckNull(getUpc()) + "[/UPC],[IMAGE]" + getIp_image() + "[/IMAGE],[IMAGE_SM]"
//				+ getIp_image_sm() + "[/IMAGE_SM])";
		String Result = Action + "|" + DatabaseSchema.ItemPic.SCHEMA_NAME
				+ "|(" + CheckNull(getUpc()) + ",[file]" + getIp_image() + "[/file],[file]"
				+ getIp_image_sm() + "[/file])";
		return Result;
	}
	public String CheckNull(String value) {
		if (value == null) {
			return null;
		} else {
			return "'" + value + "'";
		}
	}
}
